package com.ssm.demo.controller;

import com.ssm.demo.pojo.TUser;
import com.ssm.demo.service.TUserService;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author Zhang Yu
 * @description: TODO
 * @date 2024/4/3 7:46
 */
@RestController
@RequestMapping("/user")
public class TUserController {

    @Autowired
    TUserService userService;

    @RequestMapping("/login")
    public Map<String,Object> login(TUser user) {
        return userService.login(user);
    }

    @RequestMapping("/verify")
    public Map<String,Object> verify(HttpServletRequest request) {
        return userService.verify(request);
    }

    @RequestMapping("/detail")
    public Map<String,Object> detailUser(HttpServletRequest request) {
        return userService.detailUser(request);
    }
}
